clear all
set more off , permanently
capture log close
set scheme lean2


************************************************************************************
******** This do file computes the information for the descriptives table **********
************************************************************************************

		
******************************************************
******************* Load data ************************
******************************************************

// Load price panel	

		use "$dta\germany_france.dta", clear 
		
	* Drop data for both countries between 12 September 2013 and 01 October 2013
		drop if date>date("20130912","YMD") & date<date("20131001","YMD")	
		
	* Convert margins to Euro 
		replace e5_margin_17oclock = e5_margin_17oclock / 100
		replace gazole_margin_17oclock = gazole_margin_17oclock / 100
		
	* Save intermediate data set
		save "$dta\temp_data.dta" , replace
		
		
	* Load station characteristics
		use "$dta\stations.dta" , clear

	* Identify non-integrated stations
		gen brand_new = "non-integrated"
		replace brand_new = "integrated" if brand_id == 1 | brand_id == 2 | brand_id == 3 | brand_id == 4 | brand_id == 6 | brand_id == 8 | brand_id == 9 | brand_id == 10 | brand_id == 11
		gen oligopolist = "no"
		replace oligopolist = "yes" if brand_id == 1 | brand_id == 2 | brand_id == 3 | brand_id == 4 | brand_id == 6
		keep id_data brand_new oligopolist
		rename id_data station_id
		merge 1:m station_id using "$dta\temp_data.dta"
		assert _merge == 3 if country == "de"
		drop if _merge == 1
		drop _merge

	* Save intermediate data set
		save "$dta\temp_data_1.dta" , replace
	
	* Load 5km markets Germany
		use "$dta\station_markets_5.dta" , clear
		bysort master_id_data: gegen nr_comp_5km = count(tot_distance)
		replace nr_comp_5km = nr_comp_5km - 1
		keep master_id_data nr_comp_5km
		gcollapse(mean) nr_comp_5km , by(master_id_data)
		rename master_id_data station_id
		merge 1:m station_id using "$dta\temp_data_1.dta"
		*assert _merge == 3 if country == "de"
		drop if _merge == 1
		drop _merge
		save "$dta\temp_data_2.dta" , replace

	* Load 5km markets France
		use "$dta\station_markets_5_france.dta" , clear
		bysort master_id_data: gegen nr_comp_5km = count(tot_distance)
		replace nr_comp_5km = nr_comp_5km - 1
		keep master_id_data nr_comp_5km
		rename nr_comp_5km nr_comp_5km_fr
		gcollapse(mean) nr_comp_5km , by(master_id_data)
		rename master_id_data station_id
		merge 1:m station_id using "$dta\temp_data_2.dta"
		assert _merge == 3 if country == "fr"									
		drop if _merge == 1
		drop _merge
		replace nr_comp_5km = nr_comp_5km_fr if country == "fr"
		drop nr_comp_5km_fr
		
	* Save data set
		save "$dta\temp_data_3.dta", replace
	

	* Erase intermediate dtas
		cd "$dta"
		erase temp_data.dta
		erase temp_data_1.dta
		erase temp_data_2.dta
		
		
		
****************************************** 
***         Gen Table 1: panel A       ***		
****************************************** 
		
// Number of stations
	* Use data set
		use "$dta\temp_data_3.dta" , clear
	
	* Generate post-pre MTU dummy
		gen post_MTU = 1 if date > date("20130930","YMD")
		replace post_MTU= 0 if date < date("20130913","YMD")
		replace post_MTU = 2 if country == "fr" & post_MTU == 0
		replace post_MTU = 3 if country == "fr" & post_MTU == 1
	
	* Drop entries without a price
		drop if e5_17oclock_panel == .  & gazole_17oclock_panel == .  
		
	gcollapse e5_17oclock_panel gazole_17oclock_panel, by(post_MTU station_id)
		
	* Generate count variable
		gen count = 1

	gcollapse (sum) count , by(post_MTU)
	
	* Gen variable name and reshape
		gen varname = "Number of stations"
		reshape wide count , i(varname) j(post_MTU) 

	* Rename count variables
		rename count0 D_preMTU
		rename count1 D_postMTU
		rename count2 F_preMTU
		rename count3 F_postMTU
		
	* Save
		cd "$dta"
		save nr_stations_v1.dta , replace										

		
// Share of integrated firms
	* Use data set
		use "$dta\temp_data_3.dta", clear
		
	* Generate post-pre MTU dummy
		gen post_MTU = 1 if date > date("20130930","YMD")
		replace post_MTU= 0 if date < date("20130913","YMD")
		drop if country == "fr"
	
	* Drop entries without a price
	drop if e5_17oclock_panel == .  & gazole_17oclock_panel == .
		
	gcollapse e5_17oclock_panel gazole_17oclock_panel , by(post_MTU station_id brand_new)

	* Generate count variable
		gen int_count = 1 if brand_new == "integrated"
		gen nonint_count = 1 if brand_new == "non-integrated"
		
	gcollapse (sum) int_count nonint_count , by(post_MTU)
	
	* Generate the share of integrated stations
		gen int_sh = int_count / (int_count + nonint_count)
		drop int_count nonint_count

	* Reshape
		gen varname = "Share integrated stations"
		reshape wide int_sh , i(varname) j(post_MTU)
		rename int_sh0 D_preMTU
		rename int_sh1 D_postMTU
		replace D_preMTU = round(D_preMTU,0.01)
		replace D_postMTU = round(D_postMTU,0.01)
		
	* Save
		cd "$dta"
		save integrated_share_v1.dta , replace

		
// Share of oligopoly firms
	* Use data set
		use "$dta\temp_data_3.dta", clear
		
	* Generate post-pre MTU dummy
		gen post_MTU = 1 if date > date("20130930","YMD")
		replace post_MTU= 0 if date < date("20130913","YMD")
		drop if country == "fr"
	
	* Drop entries without a price
		drop if e5_17oclock_panel == .  & gazole_17oclock_panel == . 
		
	gcollapse e5_17oclock_panel gazole_17oclock_panel, by(post_MTU station_id oligopolist)

	* Generate count variable
		gen oli_count = 1 if oligopolist == "yes"
		gen nonoli_count = 1 if oligopolist == "no"
		
	gcollapse (sum) oli_count nonoli_count , by(post_MTU)
	
	* Generate the share of integrated stations
		gen oli_sh = oli_count / (oli_count + nonoli_count)
		drop oli_count nonoli_count

	* Reshape
		gen varname = "Share oligopoly stations"
		reshape wide oli_sh , i(varname) j(post_MTU)
		rename oli_sh0 D_preMTU
		rename oli_sh1 D_postMTU
		replace D_preMTU = round(D_preMTU,0.01)
		replace D_postMTU = round(D_postMTU,0.01)
		
	* Save
		cd "$dta"
		save oligopoly_share_v1.dta , replace
		
	
		
// Median number of competitors 5km
	* Use data set
		use "$dta\temp_data_3.dta", clear
		
	* Generate post-pre MTU dummy
		gen post_MTU = 1 if date > date("20130930","YMD")
		replace post_MTU= 0 if date < date("20130913","YMD")
		replace post_MTU = 2 if country == "fr" & post_MTU == 0
		replace post_MTU = 3 if country == "fr" & post_MTU == 1
	
	* Drop entries without a price
		drop if e5_17oclock_panel == .  & gazole_17oclock_panel == . 
		
	gcollapse (mean) nr_comp_5km , by(post_MTU station_id)

	gcollapse (median) nr_comp_5km , by(post_MTU)

	* Reshape
		gen varname = "Median nr. of competitors"
		reshape wide nr_comp_5km , i(varname) j(post_MTU)
		rename nr_comp_5km0 D_preMTU
		rename nr_comp_5km1 D_postMTU
		rename nr_comp_5km2 F_preMTU
		rename nr_comp_5km3 F_postMTU
		replace D_preMTU = round(D_preMTU,0.01)
		replace D_postMTU = round(D_postMTU,0.01)
		replace F_preMTU = round(F_preMTU,0.01)
		replace F_postMTU = round(F_postMTU,0.01)

	* Save
		cd "$dta"
		save median_competitors_v1.dta , replace
		

// Share of local monopolists
	* Use data set
		use "$dta\temp_data_3.dta", clear
		
	* Generate post-pre MTU dummy
		gen post_MTU = 1 if date > date("20130930","YMD")
		replace post_MTU= 0 if date < date("20130913","YMD")
		replace post_MTU = 2 if country == "fr" & post_MTU == 0
		replace post_MTU = 3 if country == "fr" & post_MTU == 1

	* Generate local monopolist dummy
		gen local_mono = 0
		replace local_mono = 1 if nr_comp_5km == 0
		
	* Drop entries without a price
		drop if e5_17oclock_panel == .  & gazole_17oclock_panel == . 
		
	gcollapse (mean) local_mono , by(post_MTU station_id)

	gcollapse (mean) local_mono , by(post_MTU)

	* Reshape
		gen varname = "Share local monopolists"
		reshape wide local_mono , i(varname) j(post_MTU)
		rename local_mono0 D_preMTU
		rename local_mono1 D_postMTU
		rename local_mono2 F_preMTU
		rename local_mono3 F_postMTU
		replace D_preMTU = round(D_preMTU,0.01)
		replace D_postMTU = round(D_postMTU,0.01)
		replace F_preMTU = round(F_preMTU,0.01)
		replace F_postMTU = round(F_postMTU,0.01)

	* Save
		cd "$dta"
		save local_monopolists_v1.dta , replace


// Create Panel A (station characteristics)

	* Append data sets
		cd "$dta"
		use nr_stations_v1.dta , clear
		append using integrated_share_v1.dta
		append using oligopoly_share_v1.dta
		append using median_competitors_v1.dta
		append using local_monopolists_v1.dta
	
	* Save
		save "$dta\Table_1_panel_a.dta", replace
		
		
// Erase data 
		erase nr_stations_v1.dta
		erase integrated_share_v1.dta
		erase oligopoly_share_v1.dta
		erase median_competitors_v1.dta
		erase local_monopolists_v1.dta

		
		
****************************************** 
***         Gen Table 1: panel B       ***		
****************************************** 
	
// Average prices and margins: petrol
	* Use data set
		use "$dta\temp_data_3.dta", clear								
		
	* Generate post-pre MTU dummy
		gen post_MTU = 1 if date > date("20130930","YMD")
		replace post_MTU= 0 if date < date("20130913","YMD")
		replace post_MTU = 2 if country == "fr" & post_MTU == 0
		replace post_MTU = 3 if country == "fr" & post_MTU == 1
		
	* Drop entries without a price
		drop if e5_17oclock_panel == . 
	
	* Calculate average prices
		gcollapse (mean) e5_17oclock_panel e5_margin_17oclock , by(post_MTU)

	* Reshape and rename
		gen pepe = 1
		reshape wide e5_17oclock_panel e5_margin_17oclock, i(pepe) j(post_MTU)
		rename e5_17oclock_panel0 D_preMTU_17price
		rename e5_margin_17oclock0 D_preMTU_17margin
		rename e5_17oclock_panel1 D_postMTU_17price
		rename e5_margin_17oclock1 D_postMTU_17margin
		rename e5_17oclock_panel2 F_preMTU_price
		rename e5_margin_17oclock2 F_preMTU_margin
		rename e5_17oclock_panel3 F_postMTU_price
		rename e5_margin_17oclock3 F_postMTU_margin
		reshape long D_preMTU_17 D_postMTU_17 F_preMTU_ F_postMTU_ , i(pepe) j(varname) string
		
	* Format
		replace pepe = 2 if varname == "margin"
		gsort pepe
		drop pepe
		replace varname = "Average price, e5" if varname == "price"
		replace varname = "Average margin, e5" if varname == "margin"
		replace D_preMTU_17 = round(D_preMTU_17,0.01)
		replace D_postMTU_17 = round(D_postMTU_17,0.01)
		replace F_preMTU_ = round(F_preMTU_,0.01)
		replace F_postMTU_ = round(F_postMTU_,0.01)
	
	* Save
		cd "$dta"
		save avg_price_margin_v1_petrol.dta , replace
	
		
// Average daily margin spread: petrol
	* Use data set
		use "$dta\temp_data_3.dta", clear
		
	* Generate post-pre MTU dummy
		gen post_MTU = 1 if date > date("20130930","YMD")
		replace post_MTU= 0 if date < date("20130913","YMD")
		replace post_MTU = 2 if country == "fr" & post_MTU == 0
		replace post_MTU = 3 if country == "fr" & post_MTU == 1
		
	* Drop entries without a margin
		drop if e5_margin_17oclock == . 
	
	* Generate variables with 5th and 95th percentile margins
		bysort post_MTU date: gegen p95_margin_17 = pctile(e5_margin_17oclock) , p(95)
		bysort post_MTU date: gegen p5_margin_17 = pctile(e5_margin_17oclock) , p(5)
		
	* Collapse on a daily basis
		gcollapse (mean) p95_margin_17 p5_margin_17, by(post_MTU date)
		gen spread_17 = p95_margin_17 - p5_margin_17
		gcollapse (mean) spread_17, by(post_MTU)

	* Reshape and rename
		gen varname = "Margin spread, e5"
		reshape wide spread_17 , i(varname) j(post_MTU)
		rename spread_170 D_preMTU_17
		rename spread_171 D_postMTU_17
		rename spread_172 F_preMTU_
		rename spread_173 F_postMTU_
		
	* Format
		replace D_preMTU_17 = round(D_preMTU_17,0.01)
		replace D_postMTU_17 = round(D_postMTU_17,0.01)
		replace F_preMTU_ = round(F_preMTU_,0.01)
		replace F_postMTU_ = round(F_postMTU_,0.01)
	
	* Save
		save margin_spread_v1_petrol.dta , replace
	

// Average prices and margins: diesel
	* Use data set
		use "$dta\temp_data_3.dta", clear								
		
	* Generate post-pre MTU dummy
		gen post_MTU = 1 if date > date("20130930","YMD")
		replace post_MTU= 0 if date < date("20130913","YMD")
		replace post_MTU = 2 if country == "fr" & post_MTU == 0
		replace post_MTU = 3 if country == "fr" & post_MTU == 1
	
	* Drop entries without a price
		drop if gazole_17oclock_panel == . 
	
	* Calculate average prices
		gcollapse (mean) gazole_17oclock_panel gazole_margin_17oclock , by(post_MTU)

	* Reshape and rename
		gen pepe = 1
		reshape wide gazole_17oclock_panel gazole_margin_17oclock, i(pepe) j(post_MTU)
		rename gazole_17oclock_panel0 D_preMTU_17price
		rename gazole_margin_17oclock0 D_preMTU_17margin
		rename gazole_17oclock_panel1 D_postMTU_17price
		rename gazole_margin_17oclock1 D_postMTU_17margin
		rename gazole_17oclock_panel2 F_preMTU_price
		rename gazole_margin_17oclock2 F_preMTU_margin
		rename gazole_17oclock_panel3 F_postMTU_price
		rename gazole_margin_17oclock3 F_postMTU_margin
		reshape long D_preMTU_17 D_postMTU_17 F_preMTU_ F_postMTU_ , i(pepe) j(varname) string
		
	* Format
		replace pepe = 2 if varname == "margin"
		gsort pepe
		drop pepe
		replace varname = "Average price, diesel" if varname == "price"
		replace varname = "Average margin, diesel" if varname == "margin"
		replace D_preMTU_17 = round(D_preMTU_17,0.01)
		replace D_postMTU_17 = round(D_postMTU_17,0.01)
		replace F_preMTU_ = round(F_preMTU_,0.01)
		replace F_postMTU_ = round(F_postMTU_,0.01)
	
	* Save
		save avg_price_margin_v1_diesel.dta , replace
	
		
// Average daily margin spread: diesel
	* Use data set
		use "$dta\temp_data_3.dta", clear
		
	* Generate post-pre MTU dummy
		gen post_MTU = 1 if date > date("20130930","YMD")
		replace post_MTU= 0 if date < date("20130913","YMD")
		replace post_MTU = 2 if country == "fr" & post_MTU == 0
		replace post_MTU = 3 if country == "fr" & post_MTU == 1
		
	* Drop entries without a margin
		drop if gazole_margin_17oclock == . 
	
	* Generate variables with 5th and 95th percentile margins
		bysort post_MTU date: gegen p95_margin_17 = pctile(gazole_margin_17oclock) , p(95)
		bysort post_MTU date: gegen p5_margin_17 = pctile(gazole_margin_17oclock) , p(5)
		
	* Collapse on a daily basis
		gcollapse (mean) p95_margin_17 p5_margin_17, by(post_MTU date)
		gen spread_17 = p95_margin_17 - p5_margin_17
		gcollapse (mean) spread_17 , by(post_MTU)

	* Reshape and rename
		gen varname = "Margin spread, diesel"
		reshape wide spread_17 , i(varname) j(post_MTU)
		rename spread_170 D_preMTU_17
		rename spread_171 D_postMTU_17
		rename spread_172 F_preMTU_
		rename spread_173 F_postMTU_
		
	* Format
		replace D_preMTU_17 = round(D_preMTU_17,0.01)
		replace D_postMTU_17 = round(D_postMTU_17,0.01)
		replace F_preMTU_ = round(F_preMTU_,0.01)
		replace F_postMTU_ = round(F_postMTU_,0.01)
	
	* Save
		save margin_spread_v1_diesel.dta , replace	
	
	
// Create Panel B (prices and margins)

	* Append data sets
		use avg_price_margin_v1_petrol.dta , clear
		append using margin_spread_v1_petrol.dta
		append using avg_price_margin_v1_diesel.dta
		append using margin_spread_v1_diesel.dta
		
	* Rename variables 
		rename D_preMTU_17 D_preMTU
		rename D_postMTU_17 D_postMTU 
		rename F_preMTU_ F_preMTU
		rename F_postMTU_ F_postMTU

	* Save
		save "$dta\Table_1_panel_b.dta", replace
		
// Table 1: combine Panel a and Panel b 
		use "$dta\Table_1_panel_a.dta", clear
		append using "$dta\Table_1_panel_b.dta"
		
		
		
		
		
		
		
		
****************************************** 
***         Gen Table 1: panel C       ***		
****************************************** 		

// Oil price information

	* Prepare crude oil price 
		use "$dta\rotterdam_price.dta" , clear
		replace p_rotterdam = p_rotterdam / 100
		
	* Keep time window used for other information in summary statistics 
		keep if date>=d(01jan2013) & date<=d(31dec2014)
		
	* Interpolate crude oil price on days where we have fuel price, but not crude oil price (Rule: If price missing, usually because of holiday, use price of day before.)
		tsset date 
		tsfill 
		sort date
		replace p_rotterdam = p_rotterdam[_n-1] if p_rotterdam == .				// the mean oil price pre- and post-MTU analagous without interpolation
		
	* Generate post-pre MTU dummy
		gen post_MTU = 1 if date > date("20130930","YMD")
		replace post_MTU= 0 if date < date("20130913","YMD")	
		
	* Calculate average prices
		gcollapse (mean) p_rotterdam, by(post_MTU)
		
	* Drop if post_mtu is missing: these are prices in France b/w 13-30.09.2013
		drop if post_MTU==.		

	* Reshape and rename
		gen pepe = 1
		reshape wide p_rotterdam, i(pepe) j(post_MTU)
		rename p_rotterdam0 Oil_price_preMTU
		rename p_rotterdam1 Oil_price_postMTU	
		
	* Format 
		replace Oil_price_preMTU = round(Oil_price_preMTU,0.01)
		replace Oil_price_postMTU = round(Oil_price_postMTU,0.01)	
	
	* Label 
		label var Oil_price_preMTU "Mean oil price pre-MTU"
		label var Oil_price_postMTU "Mean oil price post-MTU"
		
	* Rename 
		rename pepe varname 
		tostring varname, replace
		replace varname = "Mean oil price"
		
	* Save 	
		save "$dta\Table_1_panel_c.dta", replace
		
 
		
// Table 1: combine Panel a, Panel b, Panel c 
		use "$dta\Table_1_panel_a.dta", clear
		append using "$dta\Table_1_panel_b.dta"
		append using "$dta\Table_1_panel_c.dta"
		
// Gen Table 1: summary statistics table
		listtab varname D_preMTU D_postMTU F_preMTU F_postMTU Oil_price_preMTU Oil_price_postMTU using "$output\Table_1_summary_statistics.tex", type rstyle(tabular) head("\begin{tabular}{rrr}" `"\textit{variable name}&\textit{D pre-MTU}&\textit{D post-MTU}&\textit{F pre-MTU}&\textit{F post-MTU}&\textit{Oil_price_preMTU}&\textit{Oil_price_postMTU}\\"') foot("\end{tabular}") replace
		

		
// Erase data 
erase "$dta\temp_data_3.dta"	
erase "$dta\avg_price_margin_v1_petrol.dta"
erase "$dta\margin_spread_v1_petrol.dta"
erase "$dta\avg_price_margin_v1_diesel.dta"	
erase "$dta\margin_spread_v1_diesel.dta"
erase "$dta\Table_1_panel_a.dta"
erase "$dta\Table_1_panel_b.dta"
erase "$dta\Table_1_panel_c.dta"		
	
	
	

******************************************************
**   Table B1: Share of stations in percent by brand **
******************************************************
		
// Germany price data
	* Load Data
		cd "$dta"
		use germany_prices_5pm.dta, clear
		sort date

	* Generate dummy, which is 1 if station has a price at 5pm
		gen d_report17=0
		replace d_report17=1 if e5_17oclock_panel!=. | gazole_17oclock_panel!=.
		label variable d_report17 "Dummy=1 if station has price at 5:00 p.m."

	* Drop unnecessary variables & observations outside of the observation period (date<01.01.13 or date>31.12.14 or date between 12.09.13-01.10.13)
		keep date station_id d_report17
		drop if date <= date("20130101","YMD") | date > date("20141231","YMD") | date > date("20130912","YMD") & date < date("20131001","YMD") 

	* Gen Dummy=1 if Post MTU
		gen d_postmtu=0
		replace d_postmtu=1 if date > date("20130930","YMD")
		label variable d_postmtu "Dummy=1 if report is post-MTU"

	* Rename
		rename station_id id_data 

	* Save data set
		cd "$dta"
		save ger_number_reports.dta , replace

		
// Station data
	* Load Data
		cd "$dta"
		use stations.dta , clear
		
	* Clean Data
		keep id_data brand_id

	* Generate brand names
		gen brand_new = "non-integrated"
		replace brand_new = "aral" if brand_id == 1
		replace brand_new = "shell" if brand_id == 2
		replace brand_new = "total" if brand_id == 3
		replace brand_new = "esso" if brand_id == 4
		replace brand_new = "jet" if brand_id == 6
		replace brand_new = "orlen" if brand_id == 8
		replace brand_new = "agip" if brand_id == 9
		replace brand_new = "hem" if brand_id == 10
		replace brand_new = "omv" if brand_id == 11
		drop brand_id

	* Save data set
		cd "$dta"
		save stations_clean.dta , replace

// Merge with station.dta to obtain brands
		cd "$dta"
		use ger_number_reports.dta , clear
		merge m:1 id_data using stations_clean.dta						
		drop if _merge==2
		drop _merge 
		save ger_number_reports_brands.dta , replace
		erase stations_clean.dta 
		erase ger_number_reports.dta
		

// Prepare data to generate table
		cd "$dta"
		use ger_number_reports_brands.dta , clear

	* Sum # reports per brand, pre-/post- MTU 
		gcollapse (sum) d_report17 , by(d_postmtu brand_new)

	*Rename dummy (d) number (n)
		rename d_report17 n_report17

	* Reshape data
		reshape wide n_report17, i(brand_new) j(d_postmtu)

	* Rename and label variables
		rename n_report170 n_reports_pre
		label variable n_reports_pre "Number of stations reporting prices pre-MTU (01.01.13-12.09.13)"
		rename n_report171 n_reports_post
		label variable n_reports_post "Number of stations reporting prices post-MTU (01.10.13-31.12.14)"
		rename brand_new brand

// Generate shares per brand relative to total number of reporting stations in period"
	* Gen variables for shares
		gegen sum_reports_pre=total(n_reports_pre)
		gen s_reports_pre=n_reports_pre/sum_reports_pre
		label variable s_reports_pre "Share of reporting station per brand (pre-MTU)"
		gegen sum_reports_post=total(n_reports_post)
		gen s_reports_post=n_reports_post/sum_reports_post
		label variable s_reports_post "Share of reporting station per brand (post-MTU)"

		keep brand s_reports_pre s_reports_post

		gen aux_sort=1
		replace aux_sort=2 if brand=="non-integrated"

	*Round
		gen s_perc_post = 100*s_reports_post 
		gen s_perc_pre = 100*s_reports_pre 
		gen s_post=round(s_perc_post,0.1)
		gen s_pre=round(s_perc_pre,0.1)

		gsort aux_sort -s_reports_post 
		keep brand s_pre s_post

// Gen Table B1: Share of stations in percent by brand
		listtab brand s_pre s_post using "$output\Table B1_shares_stations_by_brands.tex", type rstyle(tabular) replace

		cd "$dta"
		erase ger_number_reports_brands.dta



	
	
	
	
	
	
